import time
from threading import Thread

class Planner(Thread):
	def __init__(self, callback, ttl, *args):
		Thread.__init__(self)
		self.callback = callback
		self.ttl = ttl
		self.args = args
		self.start()

	def run(self):
		time.sleep(self.ttl)
		self.callback(time.time(), *self.args)
